import java.util.Scanner;

/**
 * @Author: shark爱吃辣椒
 * @Date: 2022-21-16:42
 * @Description:
 */
public class Text {

    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        String str = sca.nextLine();
        String[] result  = str.split(" ");
        System.out.println(result.length);
    }
}
